package com.woniuxy.store.client;

import com.woniuxy.store.client.param.foodParam.InsertFoodTypeParams;
import com.woniuxy.store.client.param.foodParam.SearchFoodTypeByConditionParams;
import com.woniuxy.store.client.param.foodParam.UpdateFoodTypeParams;
import com.woniuxy.store.client.param.foodParam.UpdateFoodTypeStateParams;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import result.Result;

@FeignClient(contextId = "foodTypeClient",name="store",path="/store/food")
public interface FoodTypeClient {

    @PostMapping({"/insertFoodType"})
    Result insertFoodType(@RequestBody InsertFoodTypeParams param);

    @PutMapping({"/updateFoodTypeStateByIds"})
    Result updateFoodTypeByIds(@RequestBody UpdateFoodTypeStateParams param);

    @PutMapping({"/updateFoodTypeById"})
    Result updateFoodTypeById(@RequestBody UpdateFoodTypeParams param);

    @DeleteMapping({"/deleteFoodTypeByIds"})
    Result deleteFoodTypeByIds(@RequestParam("ids") Integer[] ids);

    @GetMapping("/searchFoodTypeByCondition")
    Result searchFoodTypeByCondition(@SpringQueryMap SearchFoodTypeByConditionParams param);



}
